using Assets.Scripts.GDK;
using System.Collections.Generic;

namespace Brick
{
	public class GameData
	{
		//private static GameData instance;

		//public static GameData Instance => instance;
		//public GameData()
		//{
		//	instance = new GameData();
		//}

		private static GameConfigModel _gameConfig;

		private static GameShopModel[] _gameShopArray;

		private static GameGiftModel[] _gameGiftArray;

		private static PiFuModel[] _pifuArray;

		private static DayModel[] _daysixArray;

		private static DayModel[] _daysevenArray;

		private static GameDataModel _gameData;

		private static List<string> _answerList;

		private static int _selectIndex;

		private static int _index;

		private static WordInfoModel _wordInfo;

		public static GameConfigModel gameConfig
		{
			get
			{
				return _gameConfig;
			}
			set
			{
				_gameConfig = value;
			}
		}

		public static GameShopModel[] gameShopArray
		{
			get
			{
				return _gameShopArray;
			}
			set
			{
				_gameShopArray = value;
			}
		}

		public static GameGiftModel[] gameGiftArray
		{
			get
			{
				return _gameGiftArray;
			}
			set
			{
				_gameGiftArray = value;
			}
		}

		public static PiFuModel[] piFuArray
		{
			get
			{
				
				return _pifuArray;
			}
			set
			{
				_pifuArray = value;
			}
		}

		public static DayModel[] DaysArray
		{
			get
			{
				return _daysixArray;
			}
			set
			{
				_daysixArray = value;
			}
		}

		public static DayModel[] Days7Array
		{
			get
			{
				return _daysevenArray;
			}
			set
			{
				_daysevenArray = value;
			}
		}

		public static GameDataModel gameData
		{
			get
			{
				if (_gameData == null)
				{
					_gameData = new GameDataModel();
				}
				return _gameData;
			}
			set
			{
				_gameData = value;
			}
		}

		public static List<string> answerList
		{
			get
			{
				return _answerList;
			}
			set
			{
				_answerList = value;
			}
		}

		public static int selectIndex
		{
			get
			{
				return _selectIndex;
			}
			set
			{
				_selectIndex = value;
				if (_selectIndex > _index)
				{
					index = value;
				}
			}
		}

		public static int index
		{
			get
			{
				_index = 1;
				if (gdk_localStorage.hasKey("index"))
				{
					_index = gdk_localStorage.getInt("index");
				}
				return _index;
			}
			set
			{
				gdk_localStorage.setInt("index", value);
			}
		}

		public static int coin
		{
			get
			{
				int result = 0;
				if (gdk_localStorage.hasKey("coin"))
				{
					result = gdk_localStorage.getInt("coin");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setInt("coin", value);
			}
		}

		public static int stars
		{
			get
			{
				int result = 0;
				if (gdk_localStorage.hasKey("stars"))
				{
					result = gdk_localStorage.getInt("stars");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setInt("stars", value);
			}
		}

		public static int curLight
		{
			get
			{
				int result = 0;
				if (gdk_localStorage.hasKey("curLight"))
				{
					result = gdk_localStorage.getInt("curLight");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setInt("curLight", value);
			}
		}

		public static int useBallIndex
		{
			get
			{
				int result = 0;
				if (gdk_localStorage.hasKey("useBallIndex"))
				{
					result = gdk_localStorage.getInt("useBallIndex");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setInt("useBallIndex", value);
			}
		}

		public static float record
		{
			get
			{
				float result = 0f;
				if (gdk_localStorage.hasKey("record"))
				{
					result = gdk_localStorage.getFloat("record");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setFloat("record", value);
			}
		}

		public static string levelNote
		{
			get
			{
				string result = string.Empty;
				if (gdk_localStorage.hasKey("levelNote"))
				{
					result = gdk_localStorage.getString("levelNote");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setString("levelNote", value);
			}
		}

		public static bool closeAD
		{
			get
			{
				string a = "OFF";
				if (gdk_localStorage.hasKey("closeAD"))
				{
					a = gdk_localStorage.getString("closeAD");
				}
				return a == "ON";
			}
			set
			{
				string value2 = "OFF";
				if (value)
				{
					value2 = "ON";
				}
				gdk_localStorage.setString("closeAD", value2);
			}
		}

		public static bool newerOut
		{
			get
			{
				string a = "OFF";
				if (gdk_localStorage.hasKey("newerOut"))
				{
					a = gdk_localStorage.getString("newerOut");
				}
				return a == "ON";
			}
			set
			{
				string value2 = "OFF";
				if (value)
				{
					value2 = "ON";
				}
				gdk_localStorage.setString("newerOut", value2);
			}
		}

		public static bool buyNewerGift
		{
			get
			{
				string a = "OFF";
				if (gdk_localStorage.hasKey("buyNewerGift"))
				{
					a = gdk_localStorage.getString("buyNewerGift");
				}
				return a == "ON";
			}
			set
			{
				string value2 = "OFF";
				if (value)
				{
					value2 = "ON";
				}
				gdk_localStorage.setString("buyNewerGift", value2);
			}
		}

		public static bool buyWeekGift
		{
			get
			{
				string a = "OFF";
				if (gdk_localStorage.hasKey("buyWeekGift"))
				{
					a = gdk_localStorage.getString("buyWeekGift");
				}
				return a == "ON";
			}
			set
			{
				string value2 = "OFF";
				if (value)
				{
					value2 = "ON";
				}
				gdk_localStorage.setString("buyWeekGift", value2);
			}
		}

		public static int dayLookAd
		{
			get
			{
				int result = 0;
				if (gdk_localStorage.hasKey("dayLookAd"))
				{
					result = gdk_localStorage.getInt("dayLookAd");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setInt("dayLookAd", value);
			}
		}

		public static string dailyRecod
		{
			get
			{
				string result = string.Empty;
				if (gdk_localStorage.hasKey("dailyRecod"))
				{
					result = gdk_localStorage.getString("dailyRecod");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setString("dailyRecod", value);
			}
		}

		public static int curDayEndLevelLen
		{
			get
			{
				int result = 0;
				if (gdk_localStorage.hasKey("EndLevelLen"))
				{
					result = gdk_localStorage.getInt("EndLevelLen");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setInt("EndLevelLen", value);
			}
		}

		public static float playLevelTime
		{
			get
			{
				float result = 0f;
				if (gdk_localStorage.hasKey("LevelTime"))
				{
					result = gdk_localStorage.getFloat("LevelTime");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setFloat("LevelTime", value);
			}
		}

		public static int playLevelIndex
		{
			get
			{
				int result = 0;
				if (gdk_localStorage.hasKey("Levelindex"))
				{
					result = gdk_localStorage.getInt("Levelindex");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setInt("Levelindex", value);
			}
		}

		public static WordInfoModel wordInfo
		{
			get
			{
				return _wordInfo;
			}
			set
			{
				_wordInfo = value;
			}
		}

		public static string pifuballs
		{
			get
			{
				string result = string.Empty;
				if (gdk_localStorage.hasKey("pifuballs"))
				{
					result = gdk_localStorage.getString("pifuballs");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setString("pifuballs", value);
			}
		}

		public static string toolsArray
		{
			get
			{
				string result = string.Empty;
				if (gdk_localStorage.hasKey("toolsArray"))
				{
					result = gdk_localStorage.getString("toolsArray");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setString("toolsArray", value);
			}
		}

		public static string newerEnter
		{
			get
			{
				string result = string.Empty;
				if (gdk_localStorage.hasKey("newerEnter"))
				{
					result = gdk_localStorage.getString("newerEnter");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setString("newerEnter", value);
			}
		}

		public static int dayFirstLogin
		{
			get
			{
				int result = 0;
				if (gdk_localStorage.hasKey("dayFirstLogin"))
				{
					result = gdk_localStorage.getInt("dayFirstLogin");
				}
				return result;
			}
			set
			{
				gdk_localStorage.setInt("dayFirstLogin", value);
			}
		}
	}
}

